package com.hunliji.monitor.web.controller.manager;


import com.hunliji.common.response.ResponseData;
import com.hunliji.monitor.web.facade.AlertConfigFacade;
import com.hunliji.monitor.web.model.param.GetUserConfigQueryParam;
import com.hunliji.monitor.web.model.param.QueryChatGroupQueryParam;
import com.hunliji.monitor.web.model.vo.ChatGroupVO;
import com.hunliji.monitor.web.model.vo.UserInfoVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 用户和群里
 * @author wuchen
 */
@RestController
@RequestMapping("/userAndChat")
public class UserAndChatManagerController {
    @Resource
    private AlertConfigFacade alertConfigFacade;
    /**
     * 获取用户信息列表
     * @param getAllAlertConfigsParam
     * @return
     */
    @GetMapping("/queryUserInfoList")
    public ResponseData<List<UserInfoVO>> queryUserInfoList(GetUserConfigQueryParam getAllAlertConfigsParam){
        return ResponseData.success(alertConfigFacade.queryUserInfoList(getAllAlertConfigsParam));
    }

    /**
     * 获取群聊列表
     * @param queryChatGroupQueryParam
     * @return
     */
    @GetMapping("/queryChatGroups")
    public ResponseData<List<ChatGroupVO>> queryChatGroups(
            QueryChatGroupQueryParam queryChatGroupQueryParam){
        return ResponseData.success(alertConfigFacade.queryChatGroups(queryChatGroupQueryParam));
    }
}
